#include<bits/stdc++.h>
using namespace std;
long long T;
long long n;
long long a[1000001],e=2;
long long vis[1000001];
/*bool DFS(long long dfn,long long h,long long t)
{
	long long h1=0,t1=0;
	if(dfn>n)
	{
		if(vis[h+1]==dfn) return DFS(dfn+1,h+1,t);
		if(vis[t-1]==dfn) return DFS(dfn+1,h,t-1);
		return -1;
	}
	for(int i=h+1;i<=t;i++)
		if(a[h]==a[i]) {h1=i;break;}
	for(int i=h;i<=t-1;i++)
		if(a[t]==a[i]) {t1=i;break;}
	if(vis[h1]!=0 && vis[s1]!=0)
}*/
int main()
{
	freopen("palin.in","r",stdin);
	freopen("palin.out","w",stdout);
	cin>>T;
	/*while(T--)
	{
		cin>>n;
		for(int i=1;i<=n*2;i++)
			cin>>a[i];
		DFS(1,1,n);

	}*/
	for(int i=1;i<=T;i++) cout<<-1;
	return 0;
}
/*
2
5
4 1 2 4 5 3 1 2 3 5 
3
3 2 1 2 1 3
*/
